/**
 * 
 */
package org.braketester.model;

import java.io.Serializable;

import org.extdev.device.ltr.LTRChannel;

/**
 * @author LAP
 *
 */
public class ChannelComboBoxItem implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 8501806216865906026L;
	private boolean active;
	private LTRChannel channel;
	
	public boolean isActive() {
		return active;
	}

	public void setActive(boolean active) {
		this.active = active;
	}

	public LTRChannel getChannel() {
		return channel;
	}

	public void setChannel(LTRChannel channel) {
		if (channel == null) throw new NullPointerException("Channel must be not null");
		this.channel = channel;
	}

	public ChannelComboBoxItem(LTRChannel channel) {
		setChannel(channel);
		active = false;
	}
	
	@Override
	public String toString() {
		return "Channel " + String.valueOf(channel.getChannelNo());
	}
}
